home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 February / Gamestar_81_2006-02_dvd.iso / Red Shark / Common / RedHouse.script < prev    next >
Text File  |  2001-10-08  |  2KB  |  77 lines

  1. //-------------------------------------------------------------------
  2. //
  3. //  This code is copyright 2001 by G5 Software.
  4. //  Any unauthorized usage, either in part or in whole of this code
  5. //  is strictly prohibited. Violators WILL be prosecuted to the
  6. //  maximum extent allowed by law.
  7. //
  8. //-------------------------------------------------------------------
  9.  
  10. class CRedHouseMesh_1
  11. {
  12.   string MeshFile = "Models/B_House_r.mesh";
  13.   string SkinFile = "Models/B_House_r.skin";
  14. }
  15.  
  16. class CRedHouseMesh_2
  17. {
  18.   string MeshFile = "Models/B_House_b.mesh";
  19.   string SkinFile = "Models/B_House_b.skin";
  20. }
  21.  
  22. class CRedHouseStateControl extends CUnitLifeControl
  23. {
  24.   void CRedHouseStateControl()
  25.   {
  26.     CUnitLifeControl(5000.0);
  27.     m_DestroyPause = 20.0;
  28.     m_ExplosionId  = "EXPLID_BuildingExplosion";
  29.   }
  30. }
  31.  
  32. // Building without ground control (for use in villages)
  33. class CBaseRedHouse extends CBuilding, CUnitWithStateControl
  34. {
  35.   array m_MeshClassNames = array(
  36.       "CRedHouseMesh_1",
  37.       "CRedHouseMesh_2"
  38.     );
  39.  
  40.   void CBaseRedHouse()
  41.   {
  42.     int MeshNumber = rand_int(m_MeshClassNames.size());
  43.     InitializeModelAsStatic(m_MeshClassNames[MeshNumber]);
  44.     CUnitWithStateControl("CRedHouseStateControl");
  45.   }
  46. }
  47.  
  48. // Single game object
  49. class CMountedRedHouse extends CBaseRedHouse
  50. {
  51.   void CMountedRedHouse()
  52.   {
  53.     InitializeGroundControl();
  54.   }
  55. }
  56.  
  57. // Building without ground control (for use in villages)
  58. class CBaseSovietRedHouse extends CBaseRedHouse
  59. {
  60.   void CBaseSovietRedHouse()
  61.   {
  62.     Core_AddClassificator("Russian");
  63.     Core_AddClassificator("GroundUnit");
  64.   }
  65. }
  66.  
  67. // Single game object
  68. class CMountedSovietRedHouse extends CBaseSovietRedHouse
  69. {
  70.   void CMountedSovietRedHouse()
  71.   {
  72.     InitializeGroundControl();
  73.   }
  74. }
  75.  
  76.  
  77.